/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package solitairetest;

import java.awt.image.*;
import java.util.Stack;
import java.util.Vector;

/**
 *
 * @author Administrator
 */
public class Pile extends javax.swing.JComponent
{
    public BufferedImage cards;
    public Vector<CardCanvas> pileCards;

    public Pile()
    {
        super();
        this.pileCards = new Stack<CardCanvas>();
    }
    
    public void Remove(CardCanvas cc)
    {
        CardCanvas current = null;

        while (!pileCards.isEmpty())
        {
            current = this.pileCards.lastElement();
            pileCards.remove(current);

            if (cc == current)
                break;
        }

        //this.pile.remove(cc);

        this.Redraw();
    }

    public void Redraw()
    {
        // Ekkert :O
    }

    public void CardClicked(boolean isTopMost)
    {
        // Ekkert :O
    }
}
